import moment from 'moment'
export const vehicleFields = [{
  title: 'ID',
  dataIndex: 'id'
}, {
  title: '标题',
  dataIndex: 'vehicleTitle'
}, {
  title: '车辆ID',
  dataIndex: 'vehicleId'
}, {
  title: '用户',
  dataIndex: 'name'
}, {
  title: '金额',
  dataIndex: 'balance'
}, {
  title: '中标金额',
  dataIndex: 'zhongbiaoBalance'
}, {
  width: 120,
  title: '状态',
  dataIndex: 'status',
  customRender: (text, row, index) => (text * 1) === 1 ? '未中标' : '中标'
}, {
  title: '时间',
  dataIndex: 'createTime',
  customRender: (text, row, index) => {
    // 接口返回的是数组
    if (Array.isArray(text)) {
      text[1] = (text[1] - 1)
    }
    return moment(text).format('YYYY-MM-DD HH:mm:ss')
  }
}, {
  title: '操作',
  dataIndex: 'operation',
  scopedSlots: { customRender: 'operation' },
  fixed: 'right',
  width: 100
}]
